<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018-10-24
 * Time: 17:37
 */

namespace App\Model;


use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;

class Order extends Model
{
    public static function orderList()
    {
        $list = DB::table('order')->paginate(env("PAGE_LIMIT_INDEX"));
        if (sizeof($list) == 0) {
            return false;
        }
        return $list;
    }

    public static function saveOrder($params, $picUrL)
    {
        return DB::table('order')->where('orderid', $params['orderid'])->update(['qr_code' => $picUrL, 'goods_title' => $params['orderid']]);
    }
}